import { ScriptConfPropsNameType } from '@common'

export type ScriptConfFormItemShowType = Record<ScriptConfPropsNameType, boolean>

const FormItemShowDir: ScriptConfFormItemShowType = {
  type: true,
  parent: true,
  name: true,
  priority: true,
  icon: true,
  color: false,
  remark: true
}

const FormItemShowScript: ScriptConfFormItemShowType = {
  type: true,
  parent: true,
  name: true,
  priority: true,
  icon: true,
  color: true,
  remark: true
}

export const FormItemShow = {
  [ScriptConfTypeConst.DIR]: FormItemShowDir,
  [ScriptConfTypeConst.SCRIPT]: FormItemShowScript
}
